<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/templates/common/taglib.jsp"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>${title }</title>
    <link rel="stylesheet" href="${basePath}/static/bootstrap/css/bootstrap.css"/>
    <link href="${basePath}/static/css/basic.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/static/css/login.css" rel="stylesheet" type="text/css">
    <link href="${basePath}/static/css/list.css" rel="stylesheet" type="text/css">
    <script  type="text/javascript" src="${basePath}/static/js/jquery.min.js"></script>
	<script  type="text/javascript" src="${basePath}/static/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="${basePath}/static/page/jqPaginator/jqPaginator.js"></script>
    
    <style type="text/css">
    	.label_a{
    		width: 78px;
			height: 32px;
			float: right;
			margin: 3px 2px auto 5px;
			line-height: 32px;
			font-family: "微锟斤拷锟脚猴拷";
			font-size: 14px;
			color: #fff;
			cursor:pointer;
			text-align: center;
			background: #039b8e;
			border-radius: 5px;
    	}

		.tdLabel_5{
			style="background-color: rgb(255,255,255);
		}
    </style>
</head>
<body>
<!--头部-->
	<%@include file="/WEB-INF/templates/common/header.jsp"%>
	<!------导航条-->
	<%@include file="/WEB-INF/templates/common/navigation.jsp"%>

<!--内容部分-->
<div class="list_main lay_out" class="clearfix">
<div class="list_DH">
        <%--  --%>
       <%@include file="/WEB-INF/templates/common/workTotalNav.jsp"%>
    </div>
    <div class="list_NR">
        <div class="loc">
            <h3 style="margin:0" >医院质量监测</h3>
        </div>
        <div class="list_con_table">
            <div class="search_table" style="position: relative; z-index: 999;">
                <ul class="clearfix" style="margin-bottom:0;">
			    <li class="Label_1">出院日期：&nbsp;</li>
			    <li class="Label_2" style="width: 282px; text-align: left; ">
			    	<input class="input_box Wdate" type="text" style="margin-left: 8px; width: 112px;border:none;border-bottom: 1px solid rgb(253,203,155);" onFocus="WdatePicker()"/>-
			    	<input class="input_box Wdate" type="text" style="width: 112px;border:none;border-bottom: 1px solid rgb(253,203,155);" onFocus="WdatePicker()"/>
			    </li>
			    <li class="Label_1">病案号：&nbsp;</li>
			    <li class="Label_2" style="width: 290px; text-align: left;margin-left: 5px;"><input class="input_box" type="text" style="width:303px;;border:none;border-bottom: 1px solid rgb(253,203,155);"/></li>
			
				<li class="Label_1">识别码：&nbsp;</li>
			    <li class="Label_2" style="width: 282px; padding: 0px; text-align: left;">
			    	<input class="input_box" type="text" style="margin-left:8px; width:235px;border:none;border-bottom: 1px solid rgb(253,203,155);"/>
			    </li>
			    <li class="Label_1">科室：&nbsp;</li>
			    <li class="Label_2" style="width: 290px;text-align: left;margin-left: 5px;"><input class="input_box" type="text" style="width:303px;;border:none;border-bottom: 1px solid rgb(253,203,155);"/></li>
				
				<li class="Label_1">疾病诊断：&nbsp;</li>
			    <li class="Label_2" style="width: 282px;  padding: 0px; text-align: left;">
			    	<input class="input_box" type="text" style="margin-left:8px;width:235px;border:none;border-bottom: 1px solid rgb(253,203,155);"/>
			    </li>
				<li class="Label_2" style="width: 390px; float: right; text-align: right; margin-right: 5px;">
					 <a class="label_a">导出</a>  
					 <a class="label_a" onclick="cj()">查询</a>
					 	<input type="radio" name="aa">原始数据
						 <input type="radio" name="aa">校准数据
						 <input type="radio" name="aa">处理数据
				</li>
    </ul>
            </div> 
   <table class="Search_tableList" cellpadding="0" cellspacing="0">
      <tr>
      <th class="tdLabel_4">病案号</th>
      <th class="tdLabel_4">识别码</th>
      <th class="tdLabel_4">姓名</th>
      <th class="tdLabel_4">专业分类</th>
      <th class="tdLabel_4">入院时间</th>
      <th class="tdLabel_4">出院时间</th>
      <th class="tdLabel_4">离院方式</th>
      </tr>
      <tbody id="tbody">
       <tr>
	      <td class="tdLabel_4 tdLabel_5">1-10553085</td>
	      <td class="tdLabel_4 tdLabel_5">6257446</td>
	      <td class="tdLabel_4 tdLabel_5">常法伦</td>
	      <td class="tdLabel_4 tdLabel_5">其他内科专业</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-08-29</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-01</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
      <tr>
	      <td class="tdLabel_4 tdLabel_5">1-10552493</td>
	      <td class="tdLabel_4 tdLabel_5">6303868</td>
	      <td class="tdLabel_4 tdLabel_5">王玉法</td>
	      <td class="tdLabel_4 tdLabel_5">胸外科专业</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-08-28</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-01</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
      <tr>
	      <td class="tdLabel_4 tdLabel_5">2-10249740</td>
	      <td class="tdLabel_4 tdLabel_5">6286451</td>
	      <td class="tdLabel_4 tdLabel_5">斐连兴</td>
	      <td class="tdLabel_4 tdLabel_5">其他外科专业</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-08-28</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-01</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
      <tr>
	      <td class="tdLabel_4 tdLabel_5">1-10551664</td>
	      <td class="tdLabel_4 tdLabel_5">6102068</td>
	      <td class="tdLabel_4 tdLabel_5">张家成</td>
	      <td class="tdLabel_4 tdLabel_5">中西医结合科</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-08-24</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-01</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
       <tr>
	      <td class="tdLabel_4 tdLabel_5">2-10249990</td>
	      <td class="tdLabel_4 tdLabel_5">6303990</td>
	      <td class="tdLabel_4 tdLabel_5">王宝林</td>
	      <td class="tdLabel_4 tdLabel_5">急诊医学科</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-08-28</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-01</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
       <tr>
	      <td class="tdLabel_4 tdLabel_5">2-10249635</td>
	      <td class="tdLabel_4 tdLabel_5">6303409</td>
	      <td class="tdLabel_4 tdLabel_5">邵长燕</td>
	      <td class="tdLabel_4 tdLabel_5">心脏外血管外科专业</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-08-25</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-04</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
       <tr>
	      <td class="tdLabel_4 tdLabel_5">1-10543450</td>
	      <td class="tdLabel_4 tdLabel_5">6295269</td>
	      <td class="tdLabel_4 tdLabel_5">张秀梅</td>
	      <td class="tdLabel_4 tdLabel_5">烧伤科专业</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-07-10</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-07</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
       <tr>
	      <td class="tdLabel_4 tdLabel_5">1-110552456</td>
	      <td class="tdLabel_4 tdLabel_5">6303837</td>
	      <td class="tdLabel_4 tdLabel_5">黄秀兰</td>
	      <td class="tdLabel_4 tdLabel_5">烧伤科专业</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-06-06</td>
	      <td class="tdLabel_4 tdLabel_5">2017-06-27</td>
	      <td class="tdLabel_4 tdLabel_5">非医嘱离院</td>
      </tr>
      
       <tr>
	      <td class="tdLabel_4 tdLabel_5">2-10250392</td>
	      <td class="tdLabel_4 tdLabel_5">6304031</td>
	      <td class="tdLabel_4 tdLabel_5">程刚</td>
	      <td class="tdLabel_4 tdLabel_5">其他内科专业</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-08-30</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-01</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
       <tr>
	      <td class="tdLabel_4 tdLabel_5">2-10250204</td>
	      <td class="tdLabel_4 tdLabel_5">6304325</td>
	      <td class="tdLabel_4 tdLabel_5">田亚美</td>
	      <td class="tdLabel_4 tdLabel_5">产科专业</td>
	      <td class="tdLabel_4 tdLabel_5" >2017-08-30</td>
	      <td class="tdLabel_4 tdLabel_5">2017-09-01</td>
	      <td class="tdLabel_4 tdLabel_5">医嘱离院</td>
      </tr>
      
      </tbody>
   </table>
        </div>
       <!--  <div class="pageList">
            <ul class="pagination clearfix" id="page_plus"></ul>
            <div class="pagination">
                <div>总共：<b id="totalPage">0</b> 条信息    当前页是第 <b id="currentPage">0/0</b>　页</div>
            </div>
        </div> -->
    </div>
</div>
<!------页脚部分--------->
<%@include file="/WEB-INF/templates/common/footer.jsp"%>

<!--JS部分-->
<script type="text/javascript">
$(function(){
	$("#tbody").hide();
})
	function cj(){
		$("#tbody").show();
	}
	function searchQua(){
		queryQua(0,1);
	}

	function queryQua(pageNo,pageSize){
		var startTime=$("#startTime").val();
		var endTime=$("#endTime").val();
		var name=$("#name").val();
		var mrId=$("#mrId").val();
		var onlyId=$("#onlyId").val();
		var outDeptId=$("#outDeptId").val();
		
		if((startTime==null || startTime=="") && (endTime==null || endTime=='') && (name==null || name=='') && (mrId==null || mrId=='') && (onlyId==null || onlyId=='') && (outDeptId==null || outDeptId=='')){
			alert("请输入查询条件!");
			return;
		}
		
		$.ajax({
			type:"post",
			url:"${basePath}/quality/getMedQualityList",
			data:{startTime:startTime,endTime:endTime,name:name,mrId:mrId,onlyId:onlyId,outDeptId:outDeptId,pageNo:pageNo,pageSize:pageSize},
			success:function(data){
				var count=data.count;
				var quaList=data.quaList;
				if(quaList!=null && quaList!=""){
					page(pageNo+1,count);
					var html="";
					for(var i=0;i<quaList.length;i++){
						var obj=quaList[i];
						html+="<tr>"+
		                      "  <td class='tdLabel_5'>"+(parseInt(i)+1)+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.mrId+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.name+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.idNumber+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.deptName+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.level+"</td>"+
			                  "  <td class='tdLabel_5'>"+obj.point+"</td>"+
			                  "  <td class='tdLabel_5'><a class='int' firstGuid='"+obj.firstGuid+"'  onclick='updateMedQua(this)'>查看</a></td>"+
			                  "</tr>";
						
					}
					
					$("#tbody").html("").html(html);
				}else{
					alert("数据为空!");
					window.location.href="${basePath}/quality/findQuality";
				}
			}
		})
		
	}
	
	 function page(currentPage,totalCounts){
	    	//var totalCounts = 1000;
	        var pageSize = 1;
	        var visiblePages = 5;
	        //var currentPage = 1;
	        /* var totalPages = totalCounts%pageSize==0?(totalCounts/pageSize):(totalCounts/pageSize+1); */
	        var totalPages = Math.ceil(totalCounts/pageSize);
	        $('#page_plus').jqPaginator({

	            totalCounts: totalCounts,
	            pageSize:pageSize,
	            visiblePages: visiblePages,
	            currentPage: currentPage,

	            first:'<li class="first"><a href="javascript:void(0);">首页</a></li>',
	            prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
	            next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
	            last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
	            page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
	            onPageChange: function (num,type) {
	            	
	            	 if(type !='init'){
	                 
	            		 queryQua(num-1,pageSize);
	                 }
	            	
	                $("#totalPage").html(totalCounts);
	                $("#currentPage").html(num+"/"+totalPages);
	            }
	        });

	    }
	 
	 
	 function updateMedQua(obj){
		 var $this=$(obj);
		 var firstGuid=$this.attr("firstGuid");
		 window.location.href="${basePath}/quality/updateMedQua?folderName="+firstGuid;
	 }
</script>

</body>
</html>